import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.util.ArrayList;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;

import times.GrupoCopa;
import javax.swing.JScrollPane;
import javax.swing.JList;


public class TelaTotalClass extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaTotalClass frame = new TelaTotalClass();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public TelaTotalClass(){}
	
	public TelaTotalClass(GrupoCopa GrupoA, GrupoCopa GrupoB){
		setTitle("Classificacao");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		ArrayList<String> TimesGrupoA=new ArrayList<String>();
		ArrayList<String> TimesGrupoB=new ArrayList<String>();
		GrupoA.gerarClassificacaoGrupo();
		GrupoB.gerarClassificacaoGrupo();
		for(int i=0;i<4;i++){
			TimesGrupoA.add(GrupoA.getClassificacao()[i].getNome());
			TimesGrupoB.add(GrupoB.getClassificacao()[i].getNome());
		}
		
		JList list = new JList(TimesGrupoA.toArray());
		list.setBounds(10, 135, 155, 101);
		contentPane.add(list);
		
		JList list_1 = new JList(TimesGrupoB.toArray());
		list_1.setBounds(10, 11, 155, 101);
		contentPane.add(list_1);
		
	}
	public TelaTotalClass(GrupoCopa Grupo) {
		setTitle("Classificacao");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblNewLabel = new JLabel(Grupo.getClassificacao()[0].getNome());
		lblNewLabel.setBounds(30, 39, 46, 14);
		contentPane.add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel(Grupo.getClassificacao()[1].getNome());
		lblNewLabel_1.setBounds(30, 91, 46, 14);
		contentPane.add(lblNewLabel_1);
		
		JLabel lblNewLabel_2 = new JLabel(Grupo.getClassificacao()[2].getNome());
		lblNewLabel_2.setBounds(30, 149, 46, 14);
		contentPane.add(lblNewLabel_2);
		
		JLabel lblNewLabel_3 = new JLabel(Grupo.getClassificacao()[3].getNome());
		lblNewLabel_3.setBounds(30, 193, 46, 14);
		contentPane.add(lblNewLabel_3);
	}
}
